Check if group has Access to an Item

Hi,

i want to check if a group has access to an item, but hasPermission() works only on users, not on groups. Can someone help me?

The next step would be to remove the access of the group, here i've tried unSet(), but works only on users too..
ManuelFelger - Thu May 07 04:06:15 EDT 2009

Re: Check if group has Access to an Item
ManuelFelger - Thu May 07 04:39:38 EDT 2009

i've found out myself, here it is:
 

Item i
Project p = project "/test123"
 
Permission None = none
 
 
for i in p do
{
    string errMsg
        
        AccessRec ar = get(i, "A_Admin", errMsg)
 
        
        if (ar != null and read ar) 
        {
                delete(ar)
                //set(i, None, "A_Admin")
                print fullName(i) "\n"
        }
}
 
 
 
print "done"